#define _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>

int main() {
    long int n = 0;
    long int t = 0;
    long int c = 0;
    while (scanf("%ld%ld%ld", &n, &t, &c) != EOF)
    {
        long int arr[1000];
        long int i = 0;
        for (i = 0; i < n; i++)
        {
            scanf("%ld", &arr[i]);
        }
        long int count = 0;
        long int j = 0;
        for (i = 0; i <= (n - c); i++)
        {
            int sum = 0;
            for (j = i; j < (i + c); j++)
            {
                sum += arr[j];
            }
            if (sum <= t)
            {
                count++;
            }
        }
        printf("%ld\n", count);
    }

    return 0;
}